<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        function Car(name,speed){
            this.name = name;
            this.speed = speed;
            
        }    //showName等于对象

        Car.prototype.showName = function(){
            console.log(this.name)
        }

        var car = new Car("奥迪",300);
        var car2 = new Car("奔驰",280);
        console.dir(car);
        console.dir(car2);
        //car2.showName();
    </script>
</head>
<body>
    
</body>
</html>